#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 305;
const ll INF = 0x3f3f3f3f3f3f3f3f;
int n,m,Q;
ll dis[N][N];
#define MaxN N*2
#define MaxM N*N
queue<int>q;
int tot;
ll res[N];
ll sum[N];
struct Node{
	int n,m,cost[MaxM*2],nxt[MaxM*2],ver[MaxM*2],edge[MaxM*2],head[MaxN],now[MaxM*2],etot = 1,ans,s,t;
	ll dist[MaxN],mc;
	int lst[MaxN],fl[MaxN];
	bool inq[MaxN];
	void adde(int u,int v,int w,int c)
	{
		nxt[++etot] = head[u];
		head[u] = etot;
		ver[etot] = v;
		edge[etot] = w;
		cost[etot] = c;
		return ;
	}
    void add(int u,int v,int w,int c){adde(u,v,w,c),adde(v,u,0,-c);}
	bool SPFA()
	{
		memset(dist,0x3f,sizeof(dist));
		q.push(s);
		dist[s] = 0;inq[s] = 1;fl[s] = 1;
		while(!q.empty())
		{
			int u = q.front();q.pop();inq[u] = 0;
            //cout<<"!"<<u<<"\n";
			for(int i = head[u];i;i = nxt[i])
			{
				int v = ver[i];
				if(now[i] < edge[i] && dist[v] > dist[u] + cost[i])
				{
					lst[v] = i;
					fl[v] = min(fl[u],edge[i] - now[i]);
					dist[v] = dist[u] + cost[i];
					if(!inq[v]) q.push(v),inq[v] = 1;
				}
			}
		}
        //cout<<"---\n";
		return dist[t] != INF;
	}
	void MCMF()
	{
		while(SPFA())
		{
			int af = fl[t];
			for(int v = t;v != s;v = ver[lst[v]^1])
			{
				now[lst[v]] += af;
				now[lst[v]^1] -= af;
			}
			ans += af;
            //cout<<"!GET"<<"\n";
            res[++tot] = dist[t];
            sum[tot] = sum[tot-1] + res[tot];
			mc += dist[t] * af;
		}
		return ;
	}
}G;
int main()
{
    //system("fc ex_journey.out journey.out");
    freopen("journey.in","r",stdin);
    freopen("journey.out","w",stdout);
    memset(dis,0x3f,sizeof(dis));
    ios::sync_with_stdio(false);cin.tie(0);
    cin>>n>>m>>Q;
    for(int i = 1,a,b,c;i <= m;i++)
    {
        cin>>a>>b>>c;
        dis[a][b] = min(dis[a][b],ll(c));
    }
    for(int i = 1;i <= n;i++) dis[i][i] = 0;
    for(int i = 1;i <= n;i++)
        for(int j = 1;j <= n;j++)
            for(int k = 1;k <= n;k++)
                dis[j][k] = min(dis[j][k],dis[j][i] + dis[i][k]);
    G.s = n+n+1;
    G.t = n+n+2;
    for(int i = 1;i <= n;i++)
    {
        G.add(G.s,i,1,0);
        G.add(i+n,G.t,1,0);
        for(int j = 1;j <= n;j++)
        {
            if(i == j || dis[i][j] == INF) continue;
            G.add(i,j+n,1,dis[i][j]);
        }
        ll d = INF;
        for(int j = 1;j <= n;j++) if(j != i) d = min(d,dis[i][j] + dis[j][i]);
        if(d != INF)G.add(i,i+n,1,d);
    }
    G.MCMF();
    while(tot < n) res[++tot] = INF;
    while(Q--)
    {
        ll x;cin>>x;
        ll id = lower_bound(res+1,res+1+n,x)-res;
        cout<<sum[id-1] + (n-id+1)*x<<"\n";
    }
    return 0;
} 